<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>RecyclerView 常见问题汇总 | 张芃</title><meta name="keywords" content="Android"><meta name="author" content="张芃"><meta name="copyright" content="张芃"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="RecyclerView 常见问题汇总RecyclerView 撑满1recyclerView.setNestedScrollingEnabled(false); &#x2F;&#x2F;可以丝滑  RecyclerView Adapter1234567891011121314151617181920212223242526272829public class xxxAdapter extends RecyclerV">
<meta property="og:type" content="article">
<meta property="og:title" content="RecyclerView 常见问题汇总">
<meta property="og:url" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2018/12/28/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/RecyclerView%20%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB/index.html">
<meta property="og:site_name" content="张芃">
<meta property="og:description" content="RecyclerView 常见问题汇总RecyclerView 撑满1recyclerView.setNestedScrollingEnabled(false); &#x2F;&#x2F;可以丝滑  RecyclerView Adapter1234567891011121314151617181920212223242526272829public class xxxAdapter extends RecyclerV">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/img/android.png">
<meta property="article:published_time" content="2018-12-27T16:00:00.000Z">
<meta property="article:modified_time" content="2022-02-11T06:24:14.617Z">
<meta property="article:author" content="张芃">
<meta property="article:tag" content="Android">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/img/android.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2018/12/28/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/RecyclerView%20%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'RecyclerView 常见问题汇总',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-02-11 14:24:14'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.0.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">23</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/android.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">张芃</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">RecyclerView 常见问题汇总</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2018-12-27T16:00:00.000Z" title="发表于 2018-12-28 00:00:00">2018-12-28</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-02-11T06:24:14.617Z" title="更新于 2022-02-11 14:24:14">2022-02-11</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%A4%A7%E5%89%8D%E7%AB%AF/">大前端</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/">Android</a></span></div><div class="meta-secondline"></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="RecyclerView-常见问题汇总"><a href="#RecyclerView-常见问题汇总" class="headerlink" title="RecyclerView 常见问题汇总"></a>RecyclerView 常见问题汇总</h1><h2 id="RecyclerView-撑满"><a href="#RecyclerView-撑满" class="headerlink" title="RecyclerView 撑满"></a>RecyclerView 撑满</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">recyclerView.setNestedScrollingEnabled(<span class="literal">false</span>); <span class="comment">//可以丝滑</span></span><br></pre></td></tr></table></figure>

<h2 id="RecyclerView-Adapter"><a href="#RecyclerView-Adapter" class="headerlink" title="RecyclerView Adapter"></a>RecyclerView Adapter</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">xxxAdapter</span> <span class="keyword">extends</span> <span class="title class_">RecyclerView</span>.Adapter&lt;xxxAdapter.ViewHolder&gt; &#123;</span><br><span class="line">    <span class="keyword">protected</span> <span class="title function_">xxxAdapter</span><span class="params">()</span><span class="params">(Context context,XX xx)</span> &#123;</span><br><span class="line">        <span class="built_in">this</span>.context=context;</span><br><span class="line">        <span class="built_in">this</span>.xx=xx;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">ViewHolder</span> <span class="keyword">extends</span> <span class="title class_">RecyclerView</span>.ViewHolder &#123;</span><br><span class="line">        <span class="keyword">public</span> <span class="title function_">ViewHolder</span><span class="params">(View itemView)</span> &#123;</span><br><span class="line">            <span class="built_in">super</span>(itemView);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="keyword">public</span> xxxAdapter.ViewHolder <span class="title function_">onCreateViewHolder</span><span class="params">(ViewGroup parent, <span class="type">int</span> viewType)</span> &#123;</span><br><span class="line">                    View view= LayoutInflater.from(parent.getContext())</span><br><span class="line">                    .inflate(R.layout.xxx,parent,<span class="literal">false</span>);</span><br><span class="line">            ViewHolder holder=<span class="keyword">new</span> <span class="title class_">ViewHolder</span>(view);</span><br><span class="line">            <span class="keyword">return</span> holder;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">onBindViewHolder</span><span class="params">(xxxAdapter.ViewHolder holder, <span class="type">int</span> position)</span> &#123;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getItemCount</span><span class="params">()</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="设置间距"><a href="#设置间距" class="headerlink" title="设置间距"></a>设置间距</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">int space = getResources().getDimensionPixelSize(R.dimen.recycler_spcae);</span><br><span class="line">recyclerView.addItemDecoration(new SpaceItemDecoration(space));//设置间隔</span><br></pre></td></tr></table></figure>

<h2 id="分割线"><a href="#分割线" class="headerlink" title="分割线"></a>分割线</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">recyclerView.addItemDecoration(<span class="keyword">new</span> <span class="title class_">DividerItemDecoration</span>(getContext(), DividerItemDecoration.VERTICAL));</span><br></pre></td></tr></table></figure></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">张芃</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2018/12/28/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/RecyclerView%20%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB/">https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2018/12/28/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/RecyclerView%20%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com" target="_blank">张芃</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Android/">Android</a></div><div class="post_share"><div class="social-share" data-image="/img/android.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2019/07/05/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20%E7%8A%B6%E6%80%81%E6%A0%8F%E9%80%8F%E6%98%8E%20%E4%B8%94%E5%8F%AF%E4%BB%A5%E7%99%BD%E5%BA%95%E9%BB%91%E5%AD%97/"><img class="prev-cover" src="/img/android.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Android 状态栏透明 且可以白底黑字</div></div></a></div><div class="next-post pull-right"><a href="/2018/08/07/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20%20drawable%E4%B8%AD%E8%BE%B9%E6%A1%86%E6%A0%B7%E5%BC%8F/"><img class="next-cover" src="/img/android.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Android drawable中边框样式</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2019/09/25/Java/%E6%9E%9A%E4%B8%BE%E5%9E%8B%20%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F/" title="枚举型 单例模式"><img class="cover" src="/img/java.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-09-25</div><div class="title">枚举型 单例模式</div></div></a></div><div><a href="/2018/08/07/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20%20drawable%E4%B8%AD%E8%BE%B9%E6%A1%86%E6%A0%B7%E5%BC%8F/" title="Android drawable中边框样式"><img class="cover" src="/img/android.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2018-08-07</div><div class="title">Android drawable中边框样式</div></div></a></div><div><a href="/2020/01/19/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20handler+WeakReference%E5%BC%B1%E5%BC%95%E7%94%A8/" title="Android handler+WeakReference弱引用"><img class="cover" src="/img/android.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-01-19</div><div class="title">Android handler+WeakReference弱引用</div></div></a></div><div><a href="/2020/04/09/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20%E6%B7%B7%E6%B7%86/" title="Android 混淆"><img class="cover" src="/img/android.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-04-09</div><div class="title">Android 混淆</div></div></a></div><div><a href="/2020/11/09/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%20%E5%BC%80%E6%BA%90/" title="Android 开源 部分不常用的收集"><img class="cover" src="/img/android.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-11-09</div><div class="title">Android 开源 部分不常用的收集</div></div></a></div><div><a href="/2019/12/20/%E5%A4%A7%E5%89%8D%E7%AB%AF/Android/Android%E5%9C%A8TextView%E4%B8%AD%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86%E6%96%87%E5%AD%97%E5%8F%AF%E7%82%B9%E5%87%BB/" title="Android在TextView中设置部分文字可点击"><img class="cover" src="/img/android.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-12-20</div><div class="title">Android在TextView中设置部分文字可点击</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">张芃</div><div class="author-info__description"></div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">23</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/zhangpeng_git"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#RecyclerView-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB"><span class="toc-number">1.</span> <span class="toc-text">RecyclerView 常见问题汇总</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#RecyclerView-%E6%92%91%E6%BB%A1"><span class="toc-number">1.1.</span> <span class="toc-text">RecyclerView 撑满</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#RecyclerView-Adapter"><span class="toc-number">1.2.</span> <span class="toc-text">RecyclerView Adapter</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AE%BE%E7%BD%AE%E9%97%B4%E8%B7%9D"><span class="toc-number">1.3.</span> <span class="toc-text">设置间距</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%86%E5%89%B2%E7%BA%BF"><span class="toc-number">1.4.</span> <span class="toc-text">分割线</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E4%B8%ADkey%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86/" title="Vue中key的工作原理"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue中key的工作原理"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E4%B8%ADkey%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86/" title="Vue中key的工作原理">Vue中key的工作原理</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6/" title="Vue函数式组件"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue函数式组件"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6/" title="Vue函数式组件">Vue函数式组件</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E7%89%B9%E6%80%A7%E6%80%BB%E7%BB%93/" title="Vue特性总结"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue特性总结"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E7%89%B9%E6%80%A7%E6%80%BB%E7%BB%93/" title="Vue特性总结">Vue特性总结</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/ElementUI/%E8%87%AA%E5%AE%9A%E4%B9%89table/" title="自定义el-table">自定义el-table</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/10/%E5%A4%A7%E5%89%8D%E7%AB%AF/CSS/%E8%A7%A3%E5%86%B3node-sass%E7%9A%84%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98/" title="解决node-sass的安装问题"><img src="" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="解决node-sass的安装问题"/></a><div class="content"><a class="title" href="/2022/02/10/%E5%A4%A7%E5%89%8D%E7%AB%AF/CSS/%E8%A7%A3%E5%86%B3node-sass%E7%9A%84%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98/" title="解决node-sass的安装问题">解决node-sass的安装问题</a><time datetime="2022-02-09T16:00:00.000Z" title="发表于 2022-02-10 00:00:00">2022-02-10</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By 张芃</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><div class="js-pjax"></div><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script></div></body></html>